package com.open.demo.activity;

import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import android.widget.Button;

import com.open.demo.R;
import com.open.demo.adapter.AppInfoAdapter;
import com.open.demo.api.DangBeiApi;
import com.open.demo.api.HttpCallBack;
import com.open.demo.view.GridViewTV;

import butterknife.ButterKnife;
import butterknife.InjectView;

/**
 */
public class MainActivity extends BaseActivity {

    @InjectView(R.id.button)
    Button button;
    @InjectView(R.id.button2)
    Button button2;
    @InjectView(R.id.appinfo_gv)
    GridViewTV mAppinfoGv;

    AppInfoAdapter mAppInfoAdapter;
    Context mContext;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ButterKnife.inject(this);
        //
//        mContext = MainActivity.this;
//        mAppInfoAdapter = new AppInfoAdapter(MainActivity.this, null);
        //
        DangBeiApi dangBeiApi = new DangBeiApi();
        dangBeiApi.getClassInfo(18, 1, new HttpCallBack() {
            @Override
            public void onSuccess(String t) {
                Log.d("hailongqiu", "hailongqiu:" + t);
//                DangBeiAppInfo dangBeiAppInfo = new DangBeiAppInfo();
//                mAppInfoAdapter.setData(dangBeiAppInfo.getTestData());
            }
        });
        //
//        mAppinfoGv.setAdapter(mAppInfoAdapter);
    }

}
